	

<?php
include_once('parsers/parser.php');
include_once('functions/printNews.php');

$diario = $_GET['diario'];

$property = 'properties/rssFeeds.xml';
$array_sources = simplexml_load_file($property);


foreach ($array_sources as $source){
	$short_name = $source->shortName;
	if ($short_name == $diario){
		$rss = $source->rssLocal;
		$name= $source->name;
		$shortName = $source->shortName;
		break;
	}
}
$news =  parse($rss, $name, $shortName);
$totalDeNews = count($news);
echo "<img src='img/logos/".$shortName.".jpg' width = '120' height = '30' /><br />";
if ($totalDeNews > 0) {
 	echo "<a class='descripcion'>Total de noticias: " . $totalDeNews . "</a><br />";
 }

printAllNewsFromSource($news);


?>

<br /> <a class="linkSubir" href="#"><img src="img/top.png" /></a>
